<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>商品分类添加</title>
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<% include("/admin/resource/common_css.html"){} %>  
		<link rel="stylesheet" href="${ctx}/plugin/zTree/zTreeStyle.css" />
	</head>	
	<body>
		<% include("/admin/common/header.html"){} %>
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>
			<div class="main-container-inner">
			  <% include("/admin/common/menu.html",{currentstr:"商品"}){} %>
				<div class="main-content">
				 <% include("/admin/common/breadcrumb.html",{breadaddfirst:"系统管理",breadaddsecond:"商品分类管理",breadaddthird:"商品分类添加"}){} %>
					<div class="page-content">
			       	   <form id="myform"  method="POST"  action="save" onsubmit="return chenkeData()"> 
				       	 <table style="margin:auto; width:75%;">
						    <tr>
								<td width="100px;" align="right" nowrap="nowrap">商品类别名称：</td> 
							    <td  width="400px;">
							      <input type="text" name="category.cat_name" id="cat_name" value="${category.cat_name!}">  <span class="red">&nbsp;*</span>
							    </td>
							    
						    </tr>
							<tr>
							   <td align="right" nowrap="nowrap">类别父级：</td>  
								<td>
			                     <div class="input-group">
								  <input   type="text" id="parentName" value="${parentName!}" readonly="readonly" style="margin: 0px;width:197px;">
									<span class="input-group-addon">
									 <a href="#addModal0" data-toggle="modal" onclick="loadData('${ctx!}')">
										<i class="icon-list" title="选择父级栏目"></i>
									 </a>
									 <input type="hidden" name="category.parent_id" id="parentId" value="${category.parent_id!}"/>
									</span>
								 </div>
			                    </td> 
							</tr>
			              	<tr>
			              	  <td align="right" nowrap="nowrap">排序：</td>
				              <td>
				              	   <input type="text" id="sort_order" name="category.sort_order"  value="${category.sort_order!}" /><span class="red">&nbsp;*</span>
				              </td>
				             <td></td> <td></td>
			              	</tr>
			              	<!--
				              	<tr>
					              	 <td align="right" nowrap="nowrap">描述：</td>
					              	 <td colspan="3">
					              	   <textarea  id="cat_desc" name="category.cat_desc" style="width: 400px; margin: 0px 0px 9px; height: 90px;">${category.cat_desc!}</textarea>
					              	 </td>
					              	 <td></td> 
								     <td></td>
				              	</tr>
						    -->
						    <tr>
			              	  <td align="right" nowrap="nowrap">扩展属性：</td>
				              <td>
				                   <%for(attribute in attributes!){%>
		                           <label>
										<input name="addattr" type="checkbox"  class="ace" value='${attribute.id!}'>
										<span class="lbl"> ${attribute.attr_name!}</span>
								   </label>
							    <%}%>
				              </td>
				             <td></td><td></td>
			              	</tr>
			              	<tr>
			              	  <td></td>
			              	  <td colspan="2">
			              	   <div id="attrvalue">
			              	   </div></td><td></td><td></td>
			              	</tr>
			             </table>
						<div class="form-actions">
						  <a class="btn btn-success" id="sava">保存</a>
						  <input type="hidden" id="id" name="category.id" value="${category.id!}"/>
						  <input type="hidden" id="oprtype" name="oprtype" value="${oprtype!}"/>
					    </div>
				     </form> 
					<!-- /.page-content -->
				</div><!-- /.main-content -->

				<% include("/admin/common/acesetting.html"){}%>
			</div><!-- /.main-container-inner -->
		</div><!-- /.main-container -->
	<% include("/admin/common/footer.html"){} %>
	<% include("/admin/resource/common_js.html"){} %>
    <script src="${ctx!}/plugin/zTree/js/jquery.ztree.core-3.5.js" type="text/javascript"></script>
    <script src="${ctx!}/plugin/zTree/js/jquery.ztree.excheck-3.5.js" type="text/javascript"></script>
    <script src="${ctx!}/plugin/zTree/js/jquery.ztree.exedit.js" type="text/javascript"></script>
    <script src="${ctx!}/js/admin/category.js"  type="text/javascript" charset="utf-8"> </script>
</body>
</html>
